An electronic device may have a plurality of switches. Each switch may be turned on and off by a corresponding button. If the switches can be combined into one, it will save space of the electronic device occupied by the switches and facilitate a user's operation of the electronic device.